﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class D03_Time4 : MonoBehaviour
{
    private void Update()
    {
        //按B暂停
        if (Input.GetKeyDown(KeyCode.B))
        {
            Time.timeScale = 0f;
        }
        //按下空格让时间变慢
        if (Input.GetKeyDown(KeyCode.Space))
        {
            Time.timeScale = 0.5f;
        }
        //按A回复正常
        if (Input.GetKeyDown(KeyCode.A))
        {
            Time.timeScale = 1f;
        }
    }
}